﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;


namespace SYFranework
{
    /// <summary>
    /// 全局委托- UI状态事件
    /// </summary>
    /// <param name="ui"></param>
    /// <param name="oldState"></param>
    /// <param name="newState"></param>
    public delegate void StateChangeEvent(object ui, UIState oldState, UIState newState);

    public enum UIState
    {
        None,
        Init,
        Loading,
        Ready,
        Disable,
        Closing
    }

    public enum UIType : int
    {
        None = -1,
        TestOne = 0,
        TestTwo = 1
    }

    public class UIPathDefines
    {
        // UI预设
        public const string UI_PREFAB = "UIPrefabs/";
        // Ui控制预设
        public const string UI_CONTROLS_PREFAB = "UIPrefabs/Contro/";
        // Ui子界面预设
        public const string UI_SUBUI_PREFAB = "UIPrefabs/SubUIs/";
        // Icon路径
        public const string UI_ICON_PATH = "UI/Icons/";

        public static string GetUIPrefabsPathByTyte(UIType _uiType)
        {
            string _path = string.Empty;
            switch (_uiType)
            {
                case UIType.TestOne:
                    _path = UI_PREFAB + "TestOne";
                    break;
                case UIType.TestTwo:
                    _path = UI_PREFAB + "TestTwo";
                    break;
                default:
                    Debug.Log("没有找到类型UI" + _uiType.ToString());
                    break;          
            }
            return _path;
        }
    }

    public class ConstObj : MonoBehaviour
    {

        
    }
}
